<!-- Modal -->
<#include "../../select.ftl" />
<div class="modal-dialog wide" style="width:840px;">
<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">
            <#if xcGjjl??>
                <#if xcGjjl.id??>
                    编辑
                <#else>
                    新增
                </#if>
            </#if>
        </h4>
    </div>
    <div class="modal-body">
        <div id="errorMessage"><#include "../../message.ftl" /></div>
        <form class="form-horizontal" role="form" id="xcGjjlForm" method="post" action="${absoluteContextPath}/xc/xcGjjl/save">
            <#if xcGjjl??>
                <#if xcGjjl.id??>
                    <input type="hidden" name="id" value="${xcGjjl.id?c}"/>
                <#else>
                    <input type="hidden" name="id" value=""/>
                </#if>
            </#if>
            <div class="row">
                <input  type="hidden" name="gsgjId" value="${xcGjjl.gsgjId?c!''}" type="text" class="form-control"/>
                <input  type="hidden" name="spareA" value="${xcGjjl.spareA!''}" type="text" class="form-control"/>
            <div class="form-group col-md-6">
                <label class="col-sm-4 control-label">姓名</label>
                <div class="col-sm-6">
                    <input name="customerName" value="${xcGjjl.customerName!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-sm-4 control-label">卡号</label>
                <div class="col-sm-6">
                    <input name="cardNo" value="${xcGjjl.cardNo!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-sm-4 control-label">性别</label>
                <div class="col-sm-6">
                    <input name="sex" value="${xcGjjl.sex!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-6">
                <label class="col-sm-4 control-label">年龄</label>
                <div class="col-sm-6">
                    <input name="age" value="${xcGjjl.age!''}" type="text" class="form-control"/>
                </div>
            </div>
                <div class="form-group col-md-6">
                    <label class="col-sm-4 control-label">跟进人</label>
                    <div class="col-sm-6">
                        <input name="userName" value="${xcGjjl.userName!''}" type="text" class="form-control"/>
                    </div>
                </div>
                <div class="form-group col-md-6">
                    <label class="col-sm-4 control-label">跟进日期</label>
                    <div class="col-sm-6">
                        <input name="gjDate" value="${xcGjjl.gjDate!''}" type="text" class="form-control"/>
                    </div>
                </div>
                <div class="form-group col-md-6">
                    <label class="col-sm-4 control-label">领取状态</label>
                    <div class="col-sm-6">
                    <@select name="spareB" value="${xcGjjl.spareB!''}" list=lqztList class="form-control"/>
                        <#--<input name="spareB" value="${xcGjjl.spareB!''}" type="text" class="form-control"/>-->
                    </div>
                </div>
                <div class="form-group col-md-6">
                    <label class="col-sm-4 control-label">跟进等级</label>
                    <div class="col-sm-6">
                    <@select name="spareC" value="${xcGjjl.spareC!''}" list=vipList class="form-control"/>

                        <#--<input name="spareC" value="${xcGjjl.spareC!''}" type="text" class="form-control"/>-->
                    </div>
                </div>


            </div>
       <div class="row" style="padding-left:70px;">
            <div class="form-group " >
                <label class="col-sm-1 control-label">重视问题</label>
                <div class="col-sm-9">

                    <textarea name="problem" class="form-control"
                              style="width: 590px"   rows="3">${xcGjjl.problem!''}</textarea>
                    <#--<input name="problem" value="${xcGjjl.problem!''}" type="text" class="form-control"/>-->
                </div>
            </div>
            <div class="form-group ">
                <label class="col-sm-1 control-label">健康意识</label>
                <div class="col-sm-9">
                    <textarea name="health" class="form-control"
                            style="width: 590px"  rows="3">${xcGjjl.health!''}</textarea>
                    <#--<input name="health" value="${xcGjjl.health!''}" type="text" class="form-control"/>-->
                </div>
            </div>
            <div class="form-group ">
                <label class="col-sm-1 control-label">跟进情况</label>
                <div class="col-sm-9">
                    <textarea name="follow" class="form-control"
                              style="width: 590px"    rows="3">${xcGjjl.follow!''}</textarea>
                    <#--<input name="follow" value="${xcGjjl.follow!''}" type="text" class="form-control"/>-->
                </div>
            </div>

            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button type="button" class="btn btn-primary" onclick="save();">保存</button>
    </div>
</div>
</div>
<script>
    function save() {
        $("#" + "xcGjjlForm").ajaxSubmit({
            success:function(data) {
                data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $('#myModal').modal("hide");
                    $.showMessage({parentId:"showMessage",message:"信息保存成功！",type:"success"});
                    refreshTable();
                } else {
                    $.showMessage({parentId:"errorMessage",message:"<strong>错误信息</strong>：" + data.returnMsg,type:"error"});
                }
            }
        });
    }
</script>